<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="react.min.js"></script>
    <script src="react-dom.js"></script>
    <script src="browser.min.js"></script>
</head>
<body>
<div id="example">

</div>
<script type="text/babel">

   var MyTitle = React.createClass({
       getDefaultProps:function () {
           return {
               title:"4324234"
           }
       },
       propTypes: { //设置验证
           title: React.PropTypes.string.isRequired,
       },

       render: function() {
           return <h1> {this.props.title} </h1>;
       }
   });

   ReactDOM.render(
           <MyTitle />,
           document.body
   );


</script>
</body>
</html>